﻿using Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace web_CategoryMS.View.G02
{
    public partial class FS0202_Sub : System.Web.UI.Page
    {
        FS0202_SubLogic fS0202_SubLogic = new FS0202_SubLogic();
        List<string> shopList { get { return (List<string>)Session["FS0202SelectedList"]; } }
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        #region 保存事件
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(txtRequirementContent.Text.Trim()))
                {
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "", "alert('请输入备注信息！');", true);
                    return;
                }
                if (shopList==null)
                {
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "", "alert('获取需求列表失败，请关闭此画面重试！');", true);
                    return;
                }
                fS0202_SubLogic.Save(shopList, txtRequirementContent.Text.Trim());
                ScriptManager.RegisterStartupScript(this, typeof(Page), "", "window.opener.recall();window.close();", true);

            }
            catch (Exception ex)
            {

            }
        }
        #endregion
    }
}